Programming with QuickTime VR

| Previous | Chapter contents | Chapter top | Section top | Next |

Object Sample Atom Structure

An object sample atom describes a single object, including information about the default viewing angles and the view settings. The structure of an object sample atom is defined by the VRObjectSampleAtom data type:

typedef struct VRObjectSampleAtom {
    UInt16                              majorVersion;
    UInt16                              minorVersion;
    UInt16                              movieType;
    UInt16                              viewStateCount;
    UInt16                              defaultViewState;
    UInt16                              mouseDownViewState;
    UInt32                              viewDuration;
    UInt32                              columns;
    UInt32                              rows;
    Float32                             mouseMotionScale;
    Float32                             minPan;
    Float32                             maxPan;
    Float32                             defaultPan;
    Float32                             minTilt;
    Float32                             maxTilt;
    Float32                             defaultTilt;
    Float32                             minFieldOfView;
    Float32                             fieldOfView;
    Float32                             defaultFieldOfView;
    Float32                             defaultViewCenterH;
    Float32                             defaultViewCenterV;
    Float32                             viewRate;
    Float32                             frameRate;
    UInt32                              animationSettings;
    UInt32                              controlSettings;
} VRObjectSampleAtom, *VRObjectSampleAtomPtr;
majorVersion
The major version number of the file format.
minorVersion
The minor version number of the file format.
movieType
The movie controller type. See "Object Controller Types" for a description of the available movie controllers for object views.
viewStateCount
The number of view states of the object. A view state selects an alternate set of images for an object's views. The value of this field must be positive.
defaultViewState
The 1-based index of the default view state. The default view state image for a given view is displayed when the mouse button is not down.
mouseDownViewState
The 1-based index of the mouse-down view state. The mouse-down view state image for a given view is displayed while the user holds the mouse button down while the cursor is over an object movie.
viewDuration
The total movie duration of all image frames contained in an object's view. In an object that uses a single frame to represent a view, the duration is the image track's sample duration time.
columns
The number of columns in the object image array (that is, the number of horizontal positions or increments in the range defined by the minimum and maximum pan values). The value of this field must be positive.
rows
The number of rows in the object image array (that is, the number of vertical positions or increments in the range defined by the minimum and maximum tilt values). The value of this field must be positive.
mouseMotionScale
The mouse motion scale factor (that is, the number of degrees that an object is panned or tilted when the cursor is dragged the entire width of the VR movie image). The default value is 180.0.
minPan
The minimum pan angle, in degrees. The value of this field must be less than the value of the maxPan field.
maxPan
The maximum pan angle, in degrees. The value of this field must be greater than the value of the minPan field.
defaultPan
The default pan angle, in degrees. This is the pan angle used when the object is first displayed. The value of this field must be greater than or equal to the value of the  minPan field and less than or equal to the value of the maxPan field.
minTilt
The minimum tilt angle, in degrees. The default value is +90.0. The value of this field must be less than the value of the maxTilt field.
maxTilt
The maximum tilt angle, in degrees. The default value is -90.0. The value of this field must be greater than the value of the minTilt field.
defaultTilt
The default tilt angle, in degrees. This is the tilt angle used when the object is first displayed. The value of this field must be greater than or equal to the value of the minTilt field and less than or equal to the value of the maxTilt field.
minFieldOfView
The minimum field of view to which the object can zoom. The valid range for this field is from 1 to the value of the fieldOfView field. The value of this field must be positive.
fieldOfView
The image field of view, in degrees, for the entire object. The value in this field must be greater than or equal to the value of the minFieldOfView field.
defaultFieldOfView
The default field of view for the object. This is the field of view used when the object is first displayed. The value in this field must be greater than or equal to the value of the minFieldOfView field and less than or equal to the value of the fieldOfView field.
defaultViewCenterH
The default horizontal view center.
defaultViewCenterV
The default vertical view center.
viewRate
The view rate (that is, the positive or negative rate at which the view animation in objects plays, if view animation is enabled). The value of this field must be from -100.0 through +100.0, inclusive.
frameRate
The frame rate (that is, the positive or negative rate at which the frame animation in a view plays, if frame animation is enabled). The value of this field must be from -100.0 through +100.0, inclusive.
animationSettings
A set of 32 bit flags that encode information about the animation settings of the object. See "Animation Settings" for a description of the constants you can use to specify a value for this field.
controlSettings
A set of 32 bit flags that encode information about the control settings of the object. See "Control Settings" for a description of the constants you can use to specify a value for this field.

© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Section top | Next |